<?php
	//数据库连接
	require_once 'init.php';
	require_once 'ckLogin.php';
	require_once 'dbClasses'.DIRECTORY_SEPARATOR.'config.php';
	require_once 'dbClasses'.DIRECTORY_SEPARATOR.'dbConn.php';
	$db = new dbConn();
	//定义表名
	define("TABLENAME","cuxiao");
	define("TABLENAME1","admin");
	define("TABLENAME2","category");
	//
	//require_once 'insertNewFunction.php';
	//前提   --- 时间
	$time = $_GET['time'];
	//$time = substr($time,0,4).'-'.substr($time,4,2).'-'.substr($time,6,2);
	//提交处理
	if(strtoupper($_SERVER['REQUEST_METHOD'])=='POST' && isset($_GET['act'])){
		//  title file picname cateid commission saledNum goodsUrl
		if ($_GET['act']=='insert'){
			$title = $_POST['title'];
			$file = $_POST['file'];
			$picname = $_POST['picname'];
			$cateid = $_POST['cateid'];
			$saledNum = $_POST['saledNum'];
			$commission = $_POST['commission'];
			$goodsUrl = $_POST['goodsUrl'];
			$sort = $_POST['sort'];
			foreach ($title as $key=>$item){
				$_picture = "http://app100656353.imgcache.qzoneapp.com/app100656353/cuxiao/".$file[$key].'/'.$picname[$key];
				$db->sql="insert into ".TABLENAME."(title, picture, cateID, saledNum, commission, goodsUrl,sort) ".
					     "values ('".$title[$key]."','".$_picture."','".$cateid[$key]."',".$saledNum[$key].",".$commission[$key].",'".str_replace(' ', '', trim($goodsUrl[$key]) )."',".$sort[$key].")";
				$db->doExecute();
			}
		}
		if ($_GET['act']=='update'){
			//<!-- picture_1 title_1  cate_id_1 goodsUrl_1 commission_1 sort_1 saledNum_1 contentID_1 -->
			$picture_1 = $_POST['picture_1'];
			$title_1 = $_POST['title_1'];
			$cate_id_1 = (int)$_POST['cate_id_1'];
			$goodsUrl_1 = $_POST['goodsUrl_1'];
			$commission_1 = $_POST['commission_1'];
			$sort_1 = (int)$_POST['sort_1'];
			$saledNum_1 = (int)$_POST['saledNum_1'];
			$contentID_1 = (int)$_POST['contentID_1'];
			$db->sql = "UPDATE cuxiao SET picture='".$picture_1."',title='".$title_1."',goodsUrl='".$goodsUrl_1."',sort=".$sort_1.",cateID=".$cate_id_1.",saledNum=".$saledNum_1.",commission=".$commission_1." WHERE id=".$contentID_1;
			$db->doExecute();
		}
			
	}
	
	/* ------------begin 文件处理---------------  */	
	
	/*------------ end 文件处理  ----------------*/
	/* ------------begin 未审核列表---------------  */
	$where = "WHERE p.`status`=0 ";
	//排序publishDate Updater shared collected
	if(!empty($_GET['sort'])){
		$sortarray = explode('_', $_GET['sort']);
		$order = "p.".$sortarray[0]." ".$sortarray[1].",";
	}else{
		$order = '';
	}
	//总条数
	$db->sql="SELECT count(id) count_id FROM ".TABLENAME." p ".$where;
	$count = $db->doResultOne();
	//分页
	if(empty($_GET['page'])){$page = 1;}else{$page=$_GET['page'];}
	if(empty($_GET['pagesize'])){$pagesize = PAGESIZE;}
	else{$pagesize = $_GET['pagesize'];}
	$pageInfo = page($count, $pagesize, $page);
	$maxPage = $pageInfo['maxPage'];
	$start = $pageInfo['start'];
	$pages = $pageInfo['pages'];
	
	$db->sql="SELECT p.*,c.cate FROM ".TABLENAME." p LEFT JOIN category c ON p.cateID = c.id ".$where." ORDER BY ".$order." p.id ASC LIMIT ".$start.",".$pagesize;
	$pictures = $db->doResultList2();
	
	//url
	$url= "?startTime=".$_GET['startTime']."&endTime=".$_GET['endTime']."&updater=".$_GET['updater']."&pagesize=".$_GET['pagesize']."&sort=".$_GET['sort'];
	$url2="?startTime=".$_GET['startTime']."&endTime=".$_GET['endTime']."&updater=".$_GET['updater']."&pagesize=".$_GET['pagesize'];
	
	/* ------------end 未审核列表---------------  */
	//分类
	$db->sql="SELECT * FROM category";
	$category = $db->doResultList2();
	
	//用户列表
	$admins = getAdmin($db);
	//var_dump($admins);
	function getAdmin($db){
		$db->sql = "SELECT * FROM ".TABLENAME1." WHERE id != 1";
		return $admins = $db->doResultList2();
	}
	//分页
	function page($total,$size,$page){
		//最大页数
		if($total%$size==0){
			$maxPage = $total/$size;
		}else{
			$maxPage = (int)($total/$size)+1;
		}
		//开始条数
		$start = ($page-1)*$size;
		//分页
		if($maxPage>=5){
			if($page<=2){
				$pages=array(1,2,3,4,5);
			}elseif($page>=($maxPage-1)){
				$pages=array($maxPage-4,$maxPage-3,$maxPage-2,$maxPage-1,$maxPage);
			}else{
				$pages=array($page-2,$page-1,$page,$page+1,$page+2);
			}
		}else{
			for($i=1;$i<=$maxPage;$i++){
				$pages[]=$i;
			}
		}
		if($page<=1){$previous=1;}else{$previous=$page-1;}
		if($page>=$maxPage) {$next = $maxPage;}else{ $next = $page+1;}
		return array('maxPage'=>$maxPage,'start'=>$start,'pages'=>$pages,'previous'=>$previous,'next'=>$next);
	}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Simpla Admin</title>
<!--                       CSS                       -->
<!-- Reset Stylesheet -->
<link rel="stylesheet" href="resources/css/reset.css" type="text/css"
	media="screen" />
<!-- Main Stylesheet -->
<link rel="stylesheet" href="resources/css/main.css" type="text/css"
	media="screen" />
<!-- Invalid Stylesheet. This makes stuff look pretty. Remove it if you want the CSS completely valid -->
<link rel="stylesheet" href="resources/css/invalid.css" type="text/css"
	media="screen" />
<!-- Colour Schemes
		Default colour scheme is green. Uncomment prefered stylesheet to use it.
		<link rel="stylesheet" href="resources/css/blue.css" type="text/css" media="screen" />
		<link rel="stylesheet" href="resources/css/red.css" type="text/css" media="screen" />  
		-->
<!-- Internet Explorer Fixes Stylesheet -->
<!--[if lte IE 7]>
			<link rel="stylesheet" href="resources/css/ie.css" type="text/css" media="screen" />
		<![endif]-->
<!--                       Javascripts                       -->
<!-- jQuery -->
<script type="text/javascript" src="resources/scripts/jquery-1.7.2.min.js"></script>
<script type="text/javascript">
$(function($) {
	$(".editbutton").click(function(){
		$("#publicDate").val( $(this).children("input:eq(0)").val() );
		$("#imgAddress").val( $(this).children("input:eq(1)").val() );
		//$("#description").html('221');
	});
	//多数据操作
	$("#AddNew").click(function(){
		var picdesc = $(this).parent().siblings("div").find(".text-input");
		var author= $(this).parent().siblings("div").find("select");
		var nopic=0;
		var noauthor=0;
		$(picdesc).each(function() {
			if( $(this).val()==''){nopic++;}  
        	});
		$(author).each(function() {
			if( $(this).val()==''){noauthor++;} 
       		 });
		if ( nopic!=0 || noauthor!=0 ) {
			alert("应填写内容共有:"+(picdesc.length+author.length)+"项 。其中有 "+nopic+" 项没有填写。"+noauthor+" 项没有选择");
			return false;
		}
		//if(nullNum != 0){alert("还有"+nullNum+"个描述没有填写！");return false;}	
	});
	//添加栏目
	$("#addNewCuxiao").click(function(){
		var content = '<p><small>标题！！</small>'+
			'<input class="text-input" type="text" name="title[]" value="" style="width: 500px;"/><br />'+
			'<small>图片：</small>http://app100656353.imgcache.qzoneapp.com/app100656353/cuxiao/'+
				'<input class="text-input" type="text" name="file[]" value="" style="width: 70px;"/>/'+
				'<input class="text-input" type="text" name="picname[]" value="01.jpg" style="width: 70px;"/>'+
			'<br /><span><small>分类：</small><select name="cateid[]" style="width: 50px;">'+
						'<option value=""></option><option id="cate-option-1" value="1">女装</option>'+
						'<option id="cate-option-2" value="2">鞋包</option><option id="cate-option-3" value="3">男装</option>'+
						'<option id="cate-option-4" value="4">其他</option><option id="cate-option-5" value="5">护肤</option>'+
						'<option id="cate-option-6" value="6">家居</option><option id="cate-option-7" value="7">首饰</option>'+
					'</select>'+
				'<small>佣金：</small><span><input class="text-input" type="text" name="commission[]" style="width: 40px;"/></span>%'+
				'<small>人气：</small><input class="text-input" type="text" name="saledNum[]" style="width: 40px;"/>'+
				'<small>排序：</small><input class="text-input" type="text" name="sort[]" value="1" style="width: 40px;"/>'+
				'<small>地址：</small><input class="text-input" type="text" name="goodsUrl[]" style="width: 210px;"/>'+
			'</span></p><hr />';
		$("#content_main").append(content);
	});
	
	$("#taobao_url_subm").click(function(){
		var taobao_item_id = $("#taobao_item_id").val();
		var taobao_url = $("#taobao_url").val();
		//alert(taobao_item_id+' || '+taobao_url);
		var img_span ='';
		//获取描述
		$.ajax({
			type: "GET",
			url: "taobaoItemInfo.php",
			data: "id="+taobao_item_id+"&url="+taobao_url,
			dataType: "json",
			success: function(date){
				$("#goodsUrl").val(taobao_url);
				$("#originalPrice").val(date.price);
				$("#title").val(date.title);
				$.each(date.item_imgs.item_img, function(i,item){
					img_span += '<input type="radio" name="taobao_item_img" value="'+item.url+'"/>'+
						'<img src="'+item.url+'" alt="" style="width: 50px;height: 50px;"/>';
				});
				$("#taobao_img_span").html(img_span);
				//$("#title").val();
				$("#message_click").click();
			}
		});
	});

	$("#loading_img").ajaxStart(function(){
		$(this).show();
	});
	$("#loading_img").ajaxSuccess(function(evt, request, settings){
		$(this).hide();
	});
	$("#loading_img").ajaxError(function(event,request, settings){
	     $(this).append("出错页面:" + settings.url + "");
	});

	//审核通过
	$(".shenheButton").click(function(){
		var id = $(this).attr("id");
		if(confirm("是否审核通过")){
			//获取描述
			$.ajax({
				type: "GET",
				url: "youpinAjax.php",
				data: "id="+id+"&act=cuxiaoShenhe",
				dataType: "html",
				success: function(date){
					//alert(date);
					
				}
			});
			$(this).parents("tr").hide();
			
		}
	});
	//修改
	$(".editButton").click(function(){
		var tds = $(this).parent('td').siblings();

		$("#picture_1").val(tds.eq(2).find('img').attr("src"));
		$("#title_1").val(tds.eq(3).text());
		$('#cate_id_1 option:selected').attr("selected",false);
		$("#cate-option-"+tds.eq(4).children('span').text()+'_1').attr("selected",true);
		$("#goodsUrl_1").val(tds.eq(5).text());
		$("#sort_1").val(tds.eq(7).text());
		$("#commission_1").val(tds.eq(6).children('span').text());
		$("#saledNum_1").val(tds.eq(8).text());
		$("#contentID_1").val(tds.eq(1).text());
		$("#message_click").click();
		
	});
	//删除
	$(".deleteButton").click(function(){
		var id = $(this).attr("id");
		if(confirm("是否删除该商品！")){
			//获取描述
			$.ajax({
				type: "GET",
				url: "youpinAjax.php",
				data: "id="+id+"&act=cuxiaoDel",
				dataType: "html",
				success: function(date){
					if(date == 1) alert('删除成功！！');
					if(date == -1)alert('删除失败，请刷新后在删除！！！');
				}
			});
			$(this).parents("tr").hide();
			
		}
	});
	$("#taobao_item_subm").click(function(){
		alert(123);
		return false;
	});
	//批量通过
	$(".tongguo").click(function(){
		//alert("121");
		var ids = '';
		$("input[type='checkbox']:checked").each(function(){
			//alert($(this).val());
			ids += $(this).val()+','
			$(this).parents("tr").hide()
			$(this).attr("checked",false);
		});
		//alert(ids);
		
		$.ajax({
			type: "GET",
			url: "youpinAjax.php",
			data: "ids="+ids+"&act=cuxiaotongguo",
			dataType: "html",
			success: function(date){
				if(date!=-1 && date){
					alert("审核通过！");
				}else{
					alert("刷新重新操作！");
				}
			}
		});
		
	});
});
</script>
<!-- jQuery Configuration -->
<script type="text/javascript" src="resources/scripts/simpla.jquery.configuration.js"></script>
<!-- Facebox jQuery Plugin -->
<script type="text/javascript" src="resources/scripts/facebox.js"></script>
<!-- jQuery WYSIWYG Plugin -->
<script type="text/javascript" src="resources/scripts/jquery.wysiwyg.js"></script>
<!-- jQuery my97datepicker -->
<script type="text/javascript" src="resources/scripts/My97DatePicker/WdatePicker.js"></script>
<!--[if IE]><script type="text/javascript" src="resources/scripts/jquery.bgiframe.js"></script><![endif]-->
<!-- Internet Explorer .png-fix -->
<!--[if IE 6]>
			<script type="text/javascript" src="resources/scripts/DD_belatedPNG_0.0.7a.js"></script>
			<script type="text/javascript">
				DD_belatedPNG.fix('.png_bg, img, li');
			</script>
		<![endif]-->

</head>
<body>
	<div id="body-wrapper">
		<!-- Wrapper for the radial gradient background -->
		<a href="#messages" rel="modal" id="message_click"></a>
		<div id="messages" style="display: none;">
			<!-- Messages are shown when a link with these attributes are clicked: href="#messages" rel="modal"  -->

			<p style="">
				<strong>促销商品修改</strong>
			</p>
			<form action="?act=update" method="post" >
				<!-- picture_1 title_1  cate_id_1 goodsUrl_1 commission_1 sort_1 saledNum_1 contentID_1 -->
				<fieldset>
					图片：
					<input class="text-input " type="text" id="picture_1" name="picture_1" style="width: 310px;"/><br />
					标题：
					<input class="text-input " type="text" id="title_1" name="title_1" style="width: 310px;"/><br />
					分类：
					<select id="cate_id_1" name="cate_id_1" style="width: 300px;">
						<option value="" ></option>
						<?php foreach ($category as $keyY=>$itemY):?>
						<option id="cate-option-<?php echo $itemY['id'];?>_1" value="<?php echo $itemY['id'];?>" ><?php echo $itemY['cate'];?></option>
						<?php endforeach;?>
					</select><br />
					链接：
					<input class="text-input " type="text" id="goodsUrl_1" name="goodsUrl_1" style="width: 310px;"/><br />
					佣金：
					<input class="text-input " type="text" id="commission_1" name="commission_1" style="width: 55px;"/>%
					排序：
					<input class="text-input " type="text" id="sort_1" name="sort_1" value="1" style="width: 80px;"/>
					人气：
					<input class="text-input " type="text" id="saledNum_1" name="saledNum_1" value="" style="width: 80px;"/><br />
										
					<input id="contentID_1" name="contentID_1" type="hidden" value="" />
					<div style="clear: both;height: 1px;background-color: #D5D5D5;margin: 10px 0;"></div>
					
					<input class="button" type="submit" value="修改" id="taobao_item_subm"/>
					<a href="javascript:void(0);" class="close" onclick="$(this).parents('#facebox').hide();"> <img src="resources/images/closelabel.jpg" title="close" class="close_image" /> </a>
				</fieldset>
			</form>
		</div>
		<!-- End #messages -->
		
		<div id="main-content">
			<!-- Page Head -->
			<h2>欢迎使用<?php echo APPLICATION;?>管理后台</h2>
			<p id="page-intro">促销商品添加！！！</p>
			<div class="clear"></div>
			<!-- End .clear -->
			图片svn： https://cdn.yun.qq.com/100656353 目录：<span style="color: red;"> cuxiao/***(目录一般为日期)/***(图片名) </span>
			<div class="content-box">
				<!-- Start Content Box -->
				<div class="content-box-header">
					<h3>促销商品添加！！！</h3>
					<!-- <ul class="content-box-tabs">
						<li><a href="#tab1" class="default-tab">Table</a></li>
						href must be unique and match the id of target div
						<li><a href="#tab2">Forms</a></li>
					</ul> -->
					<div class="clear"></div>
				</div>
				<!-- End .content-box-header -->
				<div class="content-box-content">
					<div class="tab-content default-tab" id="tab1">
						<!-- This is the target div. id must match the href of this div's tab -->
						<form action="?act=insert" method="post">
							<fieldset>
								<!-- Set class to "column-left" or "column-right" on fieldsets to divide the form into columns -->
								<?php
									//foreach ($item as $key2=>$item2):
								?>
								<!-- title file picname cateid commission saledNum goodsUrl -->
								<div id="content_main">
								<p>
									<small>请填写标题！！</small>
									<input class="text-input" type="text" name="title[]" value="" style="width: 500px;"/><br />
									<small>图片：</small>http://app100656353.imgcache.qzoneapp.com/app100656353/cuxiao/
										<input class="text-input" type="text" name="file[]" value="" style="width: 70px;"/>/
										<input class="text-input" type="text" name="picname[]" value="01.jpg" style="width: 70px;"/>
									<br />
									<span>
										<small>分类：</small><select name="cateid[]" style="width: 50px;">
												<option value=""></option>
												<option id="cate-option-1" value="1">女装</option>
												<option id="cate-option-2" value="2">鞋包</option>
												<option id="cate-option-3" value="3">男装</option>
												<option id="cate-option-4" value="4">其他</option>
												<option id="cate-option-5" value="5">护肤</option>
												<option id="cate-option-6" value="6">家居</option>
												<option id="cate-option-7" value="7">首饰</option>
											</select>
										<small>佣金：</small><span><input class="text-input" type="text" name="commission[]" style="width: 40px;"/></span>%
										<small>人气：</small><input class="text-input" type="text" name="saledNum[]" style="width: 40px;"/>
										<small>排序：</small><input class="text-input" type="text" name="sort[]" value="1" style="width: 40px;"/>
										<small>地址：</small><input class="text-input" type="text" name="goodsUrl[]" style="width: 210px;"/>
									</span>
									<!-- updater originalPrice currentPrice title desc pic goodsUrl -->
								</p>
								<hr />
								<p>
									<small>请填写标题！！</small>
									<input class="text-input" type="text" name="title[]" value="" style="width: 500px;"/><br />
									<small>图片：</small>http://app100656353.imgcache.qzoneapp.com/app100656353/cuxiao/
										<input class="text-input" type="text" name="file[]" value="" value="1" style="width: 70px;"/>/
										<input class="text-input" type="text" name="picname[]" value="02.jpg" style="width: 70px;"/>
									<br />
									<span>
										<small>分类：</small><select name="cateid[]" style="width: 50px;">
												<option value=""></option>
												<option id="cate-option-1" value="1">女装</option>
												<option id="cate-option-2" value="2">鞋包</option>
												<option id="cate-option-3" value="3">男装</option>
												<option id="cate-option-4" value="4">其他</option>
												<option id="cate-option-5" value="5">护肤</option>
												<option id="cate-option-6" value="6">家居</option>
												<option id="cate-option-7" value="7">首饰</option>
											</select>
										<small>佣金：</small><input class="text-input" type="text" name="commission[]" style="width: 40px;"/>%
										<small>人气：</small><input class="text-input" type="text" name="saledNum[]" style="width: 40px;"/>
										<small>排序：</small><input class="text-input" type="text" name="sort[]" value="1" style="width: 40px;"/>
										<small>地址：</small><input class="text-input" type="text" name="goodsUrl[]" style="width: 210px;"/>
									</span>
									<!-- updater originalPrice currentPrice title desc pic goodsUrl -->
								</p>
								<hr />
								<?php //endforeach; ?>
								</div>
								<p><input class="button" type="submit" value="提交" id="AddNew"/> <input class="button" type="button" value="新增一个新的商品添加栏" id="addNewCuxiao"/></p>
							</fieldset>
							<div class="clear"></div>
							<!-- End .clear -->
						</form>
					</div>
					<!-- End #tab1 -->
				</div>
				<!-- End .content-box-content -->
			</div>
			<!--  
			<div class="content-box"><div class="content-box-content" style="font-size: x-large;font-weight: bold;">没有新图</div></div>
			-->
			<!-- End .content-box -->
			
			
			<div class="content-box">
				<!-- Start Content Box -->
				<div class="content-box-header">
					<h3>促销<?php echo WHAT;?>审核列表</h3>
					<!-- <ul class="content-box-tabs">
						<li><a href="#tab1" class="default-tab">Table</a></li>
						href must be unique and match the id of target div
						<li><a href="#tab2">Forms</a></li>
					</ul> -->
					<div class="clear"></div>
				</div>
				<!-- End .content-box-header -->
				
				<div class="content-box-content">
					<div class="tab-content default-tab" id="tab1">
						<!-- This is the target div. id must match the href of this div's tab -->

						<table>
							<thead>
								<tr>
									<td colspan="10">
										<div class="bulk-actions align-left">
											<button class="button tongguo" >批量通过</button>
										</div>
										<?php if($maxPage>0):?>
										<div class="pagination">
											<a href="<?php //echo $url;?>&page=1" title="First Page">&laquo; First</a>
											<a href="<?php //echo $url."&page=".$pageInfo['previous'];?>" title="Previous Page">&laquo; Previous</a>
											<?php foreach ($pages as $item):?> 
											<a href="<?php echo $url."&page=".$item;?>" class="number <?php if($item == $page) echo 'current';?>" title="<?php echo $item;?>"><?php echo $item;?></a>
											<?php endforeach;?>
											<a href="<?php echo $url."&page=".$pageInfo['next'];?>" title="Next Page">Next &raquo;</a>
											<a href="<?php echo $url."&page=".$maxPage;?>" title="Last Page">Last &raquo;</a>
											total : <?php echo $maxPage;?>
										</div> 
										<?php endif;?>
										<!-- End .pagination -->
										<div class="clear"></div>
									</td>
								</tr>
							</thead>
							<thead>
								<tr>
									<th><input class="check-all" type="checkbox" value="-1"/></th>
									<th>编号</th>
									<th>图片</th>
									<th style="width: 10%;">标题</th>
									<th style="">分类</th>
									<th style="width: 15%;" class="taobao_url_css">链接</th>
									<th style="width: 6%;">佣金</th>
									<th>排序</th>
									<th>人气</th>
									<th style="width: 10%;">操作</th>
								</tr>
							</thead>
							<tbody>
							<?php if(count($pictures)>0):?>
							<?php foreach ($pictures as $key=>$item):?>
								<tr>
									<td><input type="checkbox" name="picSel" value="<?php echo $item['id'];?>"/></td>
									<td><?php echo $item['id'];?></td>
									<td><a href="<?php if($item['comefrom']==2) echo $item['picture'];else echo '../'.$item['picture'];?>" title="<?php echo $item['title'];?>" target="_blank">
											<img src="<?php echo $item['picture'];?>" alt="" width="50px;" height="50px;"/>
										</a></td>
									<td><?php echo $item['title'];?></td>
									<td><?php echo $item['cate'];?><span style="display: none;"><?php echo $item['cateID'];?></span></td>
									<td><?php echo $item['goodsUrl'];?></td>
									<td><?php if(!empty($item['commission'])) echo '<span>'.$item['commission'].'</span>%';?></td>
									<td><?php echo $item['sort'];?></td>
									<td><?php echo $item['saledNum'];?></td>
									<td>
										<!-- Icons --> 
										<?php if($_SESSION['userName']=='admin'):?>
										<a href="javascript:void(0);" title="shenhe" class="shenheButton" id="<?php echo $item['id'];?>">通过</a><br />
										<?php endif;?>
										<a href="javascript:void(0);" title="Edit" class="editButton" id="<?php echo $item['id'];?>">修改</a> <br />
										<a href="javascript:void(0);" title="Delete" class="deleteButton" id="<?php echo $item['id'];?>">删除</a> <br />
										<!-- <a href="#" title="Edit Meta"><img src="resources/images/icons/hammer_screwdriver.png" alt="Edit Meta" /></a> -->
									</td>
									
								</tr>
							<?php endforeach;?>
							<?php else:?>
								<tr style="font-size: 30px; font-weight: bold;"><td colspan="10" >没有未通过审核<?php echo WHAT;?></td></tr>
							<?php endif;?>
							</tbody>
							<tfoot>
								<tr>
									<td colspan="10">
										<div class="bulk-actions align-left">
										</div>
										<?php if($maxPage>0):?>
										<div class="pagination">
											<a href="<?php echo $url;?>&page=1" title="First Page">&laquo; First</a>
											<a href="<?php echo $url."&page=".$pageInfo['previous'];?>" title="Previous Page">&laquo; Previous</a>
											<?php foreach ($pages as $item):?> 
											<a href="<?php echo $url."&page=".$item;?>" class="number <?php if($item == $page) echo 'current';?>" title="<?php echo $item;?>"><?php echo $item;?></a>
											<?php endforeach;?>
											<a href="<?php echo $url."&page=".$pageInfo['next'];?>" title="Next Page">Next &raquo;</a>
											<a href="<?php echo $url."&page=".$maxPage;?>" title="Last Page">Last &raquo;</a>
											total : <?php echo $maxPage;?>
										</div> 
										<?php endif;?>
										<!-- End .pagination -->
										<div class="clear"></div>
									</td>
								</tr>
							</tfoot>
						</table>
					</div>
					<!-- End #tab1 -->
				</div>
				<!-- End .content-box-content -->
			</div>
			<!-- End .content-box -->
			<div class="clear"></div>
			<div id="footer">
				<small> <!-- Remove this notice or replace it with whatever you want -->
					&#169; Copyright 2009 Your Company | Powered by <a
					href="http://themeforest.net/item/simpla-admin-flexible-user-friendly-admin-skin/46073">Simpla
						Admin</a> | <a href="#">Top</a>
				</small>
			</div>
			<!-- End #footer -->
		</div>
		<!-- End #main-content -->
	</div>
</body>
<!-- Download From www.exet.tk-->
</html>
